package com.easymin.weixin.manager.impl;


import com.easymin.weixin.common.DataGrid;
import com.easymin.weixin.common.api.PartnerApi;
import com.easymin.weixin.entity.Intent;
import com.easymin.weixin.manager.PartnerManager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class DefaultPartnerManager implements PartnerManager {
  @Autowired
  PartnerApi partnerApi;

  @Override
  public DataGrid<Map<String, Object>> findByParam(String categoryAlias, Double longitude,
      Double latitude, Long intentId, Integer page, Integer rows, String appKey) {
    DataGrid<Map<String, Object>> dataGrid =
        partnerApi.findByParam(categoryAlias, longitude, latitude, intentId, page, rows, appKey);
    return dataGrid;
  }

  @Override
  public List<Intent> findIntents(String categoryAlias, String appKey) {
    return partnerApi.findIntents(categoryAlias, appKey);
  }

}
